package dancrawler.server.gamecmd;

import dancrawler.proto.cmd.CmdHandler;
import dancrawler.server.GameHandler;
import dancrawler.server.Connection;
import dancrawler.server.GameObject;
import dancrawler.server.Gameworld;
import dancrawler.proto.cmd.NetCommand;
import dancrawler.server.Tile;
import dancrawler.server.netMsg;

/**
 *
 */
public class CmdMove extends CmdHandler{
    private int direction;
    private GameHandler ch;
    
    public CmdMove(GameHandler ch, int direction)
    {
        this.direction = direction;
        this.ch = ch;
    }

    @Override
    public int getNumArgs() {
        return 0;
    }

    @Override
    public int getArgSize(int n) {
        return 0;
    }

    @Override
    public void handleCmd(netMsg msg) {
        ch.getPlayerCharacter(msg.getSender().getId()).move(direction);
    }

    @Override
    public CmdHandler getHandler() {
        return this;
    }

    @Override
    public int getId() {
        return 0;
    }

    
}
